<template>
	<div>
		<div class="row">
			<div class="col-xs-2 col-xs-offset-0">
				<div class="list-group">
					<router-link active-class="active" class="list-group-item" to="/edu/about">课程信息表管理</router-link>
					<router-link active-class="active" v-show="region == 'teacher' || region == 'admin'" class="list-group-item" to="/edu/home">教师信息表管理</router-link>
					<router-link active-class="active" class="list-group-item" to="/edu/stuinfo">学生已选课程管理</router-link>
					<router-link active-class="active" v-show="region == 'teacher' || region == 'admin'" class="list-group-item" to="/edu/teachercourse">教师排课表管理
					</router-link>
					<router-link active-class="active" class="list-group-item" to="/edu/studentselectCourse">学生信息表管理
					</router-link>
				</div>
			</div>
			<div class="col-xs-6">
				<div class="panel">
					<div class="panel-body">
						<router-view></router-view>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	import axios from 'axios'
	export default {
		name: 'edu',
		data() {
			return {
				region:''
			}
		},
		mounted() {
			//挂载完成查询身份
			axios({
				//请求地址
				url: 'http://localhost:8080/axios/selectRegion.do',
				//请求方式
				method: 'post',
			}).then(
				res => {
					//请求成功
					this.region = res.data.region
				},
				err => {
					console.log(err.message)
				}
			)
		}
	}
</script>
